<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" %>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="css/base.css" />
<link rel="stylesheet" type="text/css" href="css/jquery.dialog.css" />
<link rel="stylesheet" href="css/index.css" />
    <link rel="stylesheet" href="css/info-mgt.css" />
    <link rel="stylesheet" href="css/WdatePicker.css" />
<title>毕业生简历管理系统</title>
    <style type="text/css">
        a:link {
            font-size: 12px;
            color: #000000;
            text-decoration: none;
        }
        a:visited {
            font-size: 12px;
            color: #000000;
            text-decoration: none;
        }
        a:hover {
            font-size: 12px;
            color: #999999;
            text-decoration: none;
        }
        h1{
            font-family: 华文行楷;
        }
    </style>
</head>
<body>
<script type="text/javascript" src="js/jquery.js"></script>
<div id="container">
        <div id="hd">
            <div class="hd-wrap ue-clear">
                <div class="top-light"></div>
                <h1>毕业生简历管理系统</h1>
                <div class="login-info ue-clear">
                    <div class="welcome ue-clear"><span>欢迎您,</span><a href="employerRecommend?e_id=${employer.e_id}" class="user-name">${employer.name}</a></div>
                </div>
                <div class="toolbar ue-clear">
                    <a href="employerExit" class="quit-btn exit"></a>
                </div>
            </div>
        </div>
        <div id="bd">
            <div class="wrap ue-clear">
                <div class="sidebar">
                    <h2 class="sidebar-header"><p>功能导航</p></h2>
                    <ul class="nav">
                        <li class="recommend"><div class="nav-header" onclick="employerSkip1()"><a  class="ue-clear"><span>内容推荐</span></a></div></li>
                        <li class="position_manage"><div class="nav-header" onclick="employerSkip8()"><a class="ue-clear"><span>招聘岗位管理</span></a></div>
                        <li class="search"><div class="nav-header" onclick="employerSkip7()"><a class="ue-clear"><span>人才搜索</span></a></div></li>
                        <li class="inform"><div class="nav-header" onclick="employerSkip5()" ><a  class="ue-clear"><span>求职者通知</span></a></div></li>
                        <li class="manage"><div class="nav-header" onclick="employerSkip6()" ><a  class="ue-clear"><span>聘用信息反馈</span></a></div></li>
                    </ul>
                </div>
            <div class="content">
                <div class="title"><h2>已聘用名单</h2></div>
                <div class="query">
                    <form method="post" action="findAcceptedCandidatesByParams">
                        <input name="e_name" value="${sessionScope.employer.name}" hidden>
                        <div class="conditions name ue-clear" style="margin-top: -1px;width: 441px">
                            <label style="width: 140px">学校（专业自动分组）：</label>
                            <input style="width:195px;height:25px;border:1px solid #C5D6E0" name="school" type="text">
                        </div>
                        <div class="query-btn ue-clear">
                            <input style="background-color:#8eb2d2;color:white;border-radius:10px" type="submit" value="分类"/>
                            <input style="background-color:#EFF6FA;color:black;border-radius:10px" type="reset" value="清空"/>
                        </div>
                    </form>
                </div>
                <div class="table-box">
                    <table>
                        <thead>
                        <tr id="tr">
                            <th class="num">序号</th>
                            <th class="num">姓名</th>
                            <th class="num">专业</th>
                            <th class="num">毕业学校</th>
                            <th class="num">薪资要求</th>
                            <th class="num">学校邮箱</th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${candidates}" var ="candidate"  begin="0" varStatus="status">
                            <tr>
                                <td class="num" aria-readonly="true">${status.count }</td>
                                <td class="num" aria-readonly="true">${candidate.name}</td>
                                <td class="num" aria-readonly="true">${candidate.major}</td>
                                <td class="num" aria-readonly="true">&nbsp;${candidate.school}</td>
                                <td class="num" aria-readonly="true">${candidate.salary_requirement}</td>
                                <td class="num" aria-readonly="true">${candidate.school_email}</td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
                <div class="pagination ue-clear">
                    <%--	分页--%>
                    <%--		<nav aria-label="Page navigation">--%>
                    <ul class="pagination">
                        <%--				前一页--%>
                        <c:choose>
                            <c:when test="${pageInfo.isFirstPage}">
                                <li>
                                    <a href="javascript:void(0)" aria-label="Previous">
                                        <span aria-hidden="true"><<</span>
                                    </a>
                                </li>
                            </c:when>
                            <c:otherwise>
                                <li>
                                    <a href="findAllAcceptedCandidatesByEId?e_id=${employer.e_id}&&pageNum=${pageInfo.prePage}" aria-label="Previous">
                                        <span aria-hidden="true"><<</span>
                                    </a>
                                </li>
                            </c:otherwise>
                        </c:choose>
                        <%--			中间具体页数--%>
                        <c:forEach items="${pageInfo.navigatepageNums}" var="pi">
                            <li><a href="findAllAcceptedCandidatesByEId?e_id=${employer.e_id}&&pageNum=${pi}">${pi}</a></li>
                        </c:forEach>

                        <%--			后一页--%>

                        <c:choose>
                            <c:when test="${pageInfo.isLastPage}">
                                <li>
                                    <a href="javascript:void(0)" aria-label="Next">
                                        <span aria-hidden="true">>></span>
                                    </a>
                                </li>
                            </c:when>
                            <c:otherwise>
                                <li>
                                    <a href="findAllAcceptedCandidatesByEId?e_id=${employer.e_id}&&pageNum=${pageInfo.nextPage}" aria-label="Next">
                                        <span aria-hidden="true">>></span>
                                    </a>
                                </li>
                            </c:otherwise>
                        </c:choose>
                    </ul>
                    <%--		</nav>--%>
                </div>            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/core.js"></script>
<script type="text/javascript" src="js/jquery.dialog.js"></script>
<script type="text/javascript" src="js/index.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/WdatePicker.js"></script>
<script>
    function employerSkip1(){ const e_id="${employer.e_id}"; location.href="employerRecommend?e_id="+e_id}
    function employerSkip7(){ const e_id="${employer.e_id}"; location.href="findAllCandidates?e_id="+e_id}
    function employerSkip5(){ const e_id="${employer.e_id}"; location.href="employerNotice?e_id="+e_id}
    function employerSkip6(){ const e_id="${employer.e_id}"; location.href="findAllAcceptedCandidatesByEId?e_id="+e_id}
    function employerSkip8(){ const e_id="${employer.e_id}"; location.href="findAllPositionsByEId?e_id="+e_id}

    const  msg="${message}";
    if(msg){
        alert(msg);
    }
</script>
</html>